#docker build -t myapp .
#msyql Dockfile
#FROM mysql:latest
#COPY ./init.sql /docker-entrypoint-initdb.d/

#docker 运行容器指令
#docker run -d --name db -itd \
#-p 3306:3306 \
#-v ./my.cnf:/etc/mysql/my.cnf \
#-v ./conf.d:/etc/mysql/conf.d \
#-v /data:/var/lib/mysql \
#-e TZ=Asia/Shanghai \
#-e MYSQL_ROOT_PASSWORD=123456 \
#--network appnet \
#db

#netstat -tulpn | grep :3306
#构建jdk镜像
#FROM openjdk:17
#WORKDIR /app
#COPY app.jar .
#EXPOSE 8080
#ENTRYPOINT ["java","-jar","app.jar"]

#docker run -d --name redis -d \
#-p 6379:6379 \
#-v ./conf:/etc/redis \
#-v./data:/data \
#--network appnet \
#redis
#redis \
#redis-server /etc/redis/redis.conf

docker rm -f backend
docker rmi backend:latest
docker build -t backend /root/app/backend
docker run --name backend -itd \
-p 8080:8080 \
--network appnet \
-v ./application/application.yml:/app/application.yml \
-v ./application/application-dev.yml:/app/application-dev.yml \
backend
docker logs -f backend




docker run \
-p 80:80 \
--name nginx \
--network appnet \
-v /home/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \
-v /home/nginx/conf/conf.d:/etc/nginx/conf.d \
-v /home/nginx/log:/var/log/nginx \
-v /home/nginx/html:/usr/share/nginx/html \
-d nginx:latest
